﻿namespace ScrumLite.WebUx.DeliverablesViews
{
    using System;
    using System.Globalization;
    using ScrumLite.WebUx.SharedViews;
    using ScrumLite.WebUx.Models;

    public partial class List : ContextViewPage<DeliverablesListViewData>
    {
        //TODO: REFACTOR THIS. ITS IN LINQCOMMITMENTS SERVICE
        protected static int GetYearWeek(DateTime date)
        {
            CultureInfo invariant = CultureInfo.InvariantCulture;
            return invariant.Calendar.GetWeekOfYear(date,
                                   invariant.DateTimeFormat.CalendarWeekRule,
                                   invariant.DateTimeFormat.FirstDayOfWeek);
        }
    }
}
